package tech.yangzhijie.basic.knowledge.basic;

/**
 * 测试继承中Final对private方法的重写与否
 * 答案是父类private方法与子类private同名方法不是重写 是不同的两个方法
 * initializationSequence
 */
public class FinalTest {

    public static void main(String[] args) {
        Super s = new Super();
        Super c = new Child();
        s.test01();
        c.test01();
    }
}
class Super{
    private void test(){
        System.out.println("Super | Test");
    }

    public void test01(){
        test();
    }
}

class Child extends Super{
    private void test(){
        System.out.println("Child | test");
    }

    public void test01(){
        test();
    }
}
